package com.chigga.admin.domain.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.*;
import lombok.Data;

@Schema(description = "基本用户信息")
@Data
public class UserDTO {
    /**
     * 密码
     */
    @NotBlank(message = "密码不能为空")
    @Size(min = 6, max = 20, message = "密码长度为6-20位")
    @Schema(description = "密码", requiredMode = Schema.RequiredMode.REQUIRED, example = "chigga")
    private String password;

    /**
     * 姓名
     */
    @NotBlank(message = "姓名不能为空")
    @Size(min = 2, max = 20, message = "姓名长度为2-20位")
    @Schema(description = "姓名", requiredMode = Schema.RequiredMode.REQUIRED, example = "chigga")
    private String name;

    /**
     * 性别
     */
    @Schema(description = "性别", example = "男")
    private String gender;

    /**
     * 年龄
     */
    @Positive(message = "年龄必须为正数")
    @Min(value = 1, message = "年龄必须大于0")
    @Schema(description = "年龄", example = "18")
    private Integer age;

    /**
     * 邮箱
     */
    @Email(message = "邮箱格式不正确")
    @Schema(description = "邮箱", requiredMode = Schema.RequiredMode.REQUIRED, example = "chigga@chigga.com")
    private String email;

    /**
     * 状态
     */
    @Schema(description = "状态", example = "true")
    private Boolean status;
}
